using System;
using System.Data;
 

/// <summary>
/// Summary description for Class1
/// </summary>
public class Common
{
	public Common()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public int IsExistItemInShoppingCart(
    string itemID,
    DataTable dataTable)
    {
        int indexOfRow = -1;
        for(int dataRow = 0; dataRow< dataTable.Rows.Count; dataRow++)
        {
            if (dataTable.Rows[dataRow]["ID"].ToString() == itemID)
            {
                indexOfRow = dataRow;
                break;
            }
        }
        return indexOfRow;
    }
}
